package com.xinfu.newproject.ui.visitors_record;


import android.os.Bundle;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.xinfu.newproject.R;
import com.xinfu.newproject.adapter.visitor_adapter.VisitorListAdapter;
import com.xinfu.newproject.base.BaseFragment;
import com.xinfu.newproject.bean.matter_repair.MatterListDataBean;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;


/**
 * 月卡
 */
public class VisitorsRecordOneFragment extends BaseFragment {

    @BindView(R.id.fragment_visitor_record_one_rv)
    RecyclerView mRecyclerView;

    private VisitorListAdapter visitorListAdapter;

    public VisitorsRecordOneFragment() {
        // Required empty public constructor
    }

    public static VisitorsRecordOneFragment getInstance(String carTypeParam) {
        VisitorsRecordOneFragment fragment = new VisitorsRecordOneFragment();
        Bundle bundle = new Bundle();
        bundle.putString("carType", carTypeParam);
        fragment.setArguments(bundle);
        return fragment;
    }


    @Override
    protected int setLayoutResourceID() {
        return R.layout.fragment_visitor_record_one;
    }

    @Override
    protected void setUpView() {
        mRecyclerView.setLayoutManager(new LinearLayoutManager(getMContext()));
        visitorListAdapter = new VisitorListAdapter();
        mRecyclerView.setAdapter(visitorListAdapter);

    }

    @Override
    protected void setUpData() {
        List<MatterListDataBean> matterList = new ArrayList<>();
        for (int i = 0; i < 4; i++) {
            MatterListDataBean matterListDataBean = new MatterListDataBean();
            matterListDataBean.setTypeName("李易峰");
            matterListDataBean.setStatus("再次邀请");
            matterListDataBean.setTime("2017-07-13");
            matterList.add(matterListDataBean);
        }
        visitorListAdapter.addData(matterList);
    }
}
